﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Entropy3D
{
    public class Transform
    {

        private Matrix transform = Matrix.Identity;
        public Matrix TransformMatrix
        {
            get { return transform; }
        }

        public Vector3 Position
        {
            get { return transform.Translation; }
        }

        public Transform()
        {
            // transform *= Matrix.CreateScale(0.05f);
        }

        public void Translate(Vector3 translation)
        {
            transform *= Matrix.CreateTranslation(translation);
        }

        public void Rotate(float radians, Vector3 axis)
        {
            axis.Normalize();
            transform *= Matrix.CreateRotationZ(radians * axis.Z) * Matrix.CreateRotationX(radians * axis.X) * Matrix.CreateRotationY(radians * axis.Y);
        }
    }
}
